<!DOCTYPE html>
<html lang="en">
<head>
    <title>{{ result.Name }}相关信息</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <link rel="stylesheet" href="{{ url_for('static',filename='css/weui.min.css') }}">
    <link rel="stylesheet" href="{{ url_for('static',filename='css/jquery-weui.min.css') }}">
    <link rel="stylesheet" href="{{ url_for('static',filename='css/weui.css') }}">
    <link rel="stylesheet" href="{{ url_for('static',filename='css/example.css') }}">
    <link rel="stylesheet" href="{{ url_for('static',filename='css/jquery-weui.css') }}">
    <script src="../static/js/zepto.min.js"></script>
    <script src="../static/js/example.js"></script>
    <script src="../static/js/weui.min.js"></script>
    <script type="text/javascript" src="../static/js/jquery-weui.js"></script>
</head>
<body>
<div class="weui-panel weui-panel_access" style="background-color: #f8f8f8">
  <div class="weui-panel__bd">
    <div class="weui-media-box weui-media-box_appmsg">
      <div class="weui-media-box__bd">
           {% if result.Sex == '0' %}
               <h4 class="weui-media-box__title" style="font-size: 14px">{{ result.Name }}（女）</h4>
            {% else %}
               <h4 class="weui-media-box__title" style="font-size: 14px">{{ result.Name }}（男）</h4>
            {% endif %}
        <p class="weui-media-box__desc" style="font-size: 14px;color: black">学号：{{ uid }}</p>
        <p class="weui-media-box__desc" style="font-size: 14px;color: black">学院：{{result.CollegeName}}&nbsp;{{ result.SpeGrade }}级&nbsp;{{ result.ClassName }}</p>

      {% if counsellor.TeacherName == None or counsellor.TeacherName == Null %}
            <p class="weui-media-box__desc" style="font-size: 14px;color: black">辅导员：无</p>
      {% else %}
        <p class="weui-media-box__desc" style="font-size: 14px;color: black">辅导员：{{ counsellor.TeacherName }}</p>
      {% endif %}
        <p style="margin-right: 10px; font-size: 13px; color: #9b9b9b; text-align: left">注：{{ user }}老师请保护学生隐私，查询日志会被记录</p>
      </div>
    </div>
  </div>
</div>
<h2 align="center"></h2>
        <div class="bd">
            <div class="weui_grids">
                {% if power == 1 %}
                <a href="http://jza.gangxi.xiaosikeji.com/detail?uid={{ uid }}" class="weui_grid" id="paper1_record">
                    <div class="weui_grid_icon">
                        <img src='{{ url_for("static", filename="images/class_info.png") }}' alt="">
                    </div>
                    <p class="weui_grid_label">
                        档案
                    </p>
                </a>
                {% else %}
                 <a href="javascript:;" id="show-toast-forbidden" class="weui_grid" >
                    <div class="weui_grid_icon">
                        <img src='{{ url_for("static", filename="images/class_info.png") }}' alt="">
                    </div>
                    <p class="weui_grid_label">
                        档案
                    </p>
                </a>
                {% endif %}
                <a href="http://jza.gangxi.xiaosikeji.com/score?uid={{ uid }}" class="weui_grid" id="score_record">
                    <div class="weui_grid_icon">
                        <img src='{{ url_for("static", filename="images/class_score.png") }}' alt="">
                    </div>
                    <p class="weui_grid_label">
                        成绩
                    </p>
                </a>
                 {% if power == 1  %}
                <a href="http://jza.gangxi.xiaosikeji.com/remark/publish?uid={{ uid }}" class="weui_grid" id="hiostory_record">
                    <div class="weui_grid_icon">
                        <img src='{{ url_for("static", filename="images/class_history.png") }}' alt="">
                    </div>
                    <p class="weui_grid_label">
                        履历
                    </p>
                </a>
                 {% else %}
                 <a href="javascript:;" id="show-toast-forbidden2" class="weui_grid" >
                    <div class="weui_grid_icon">
                        <img src='{{ url_for("static", filename="images/class_info.png") }}' alt="">
                    </div>
                    <p class="weui_grid_label">
                        履历
                    </p>
                </a>
                 {% endif %}
         {% if power == 1 %}
            {% if location_pow == 1 %}
                <a href="http://jza.gangxi.xiaosikeji.com/location?uid={{ uid }}" class="weui_grid" id="score_record">
                    <div class="weui_grid_icon">
                        <img src='{{ url_for("static", filename="images/location.png") }}' alt="">
                    </div>
                    <p class="weui_grid_label">
                        定位
                    </p>
                </a>
            {% else %}
                <a href="javascript:;" class="weui_grid" id="nolocation">
                    <div class="weui_grid_icon">
                        <img src='{{ url_for("static", filename="images/location.png") }}' alt="">
                    </div>
                    <p class="weui_grid_label">
                        定位
                    </p>
                </a>
            {% endif %}
         {% else %}
                <a href="javascript:;" class="weui_grid" id="show-toast-forbidden3">
                    <div class="weui_grid_icon">
                        <img src='{{ url_for("static", filename="images/location.png") }}' alt="">
                    </div>
                    <p class="weui_grid_label">
                        定位
                    </p>
                </a>
         {% endif %}
            {% if power == 1 %}
                <a href="http://jza.gangxi.xiaosikeji.com/selfhostel?username={{ result.Name }}&userid={{ uid }}" class="weui_grid" >
                    <div class="weui_grid_icon">
                        <img src='{{ url_for("static", filename="images/self_hostel.png") }}' alt="">
                    </div>
                    <p class="weui_grid_label">
                        楼宇记录
                    </p>
                </a>
            {% else %}
                <a href="javascript:;" class="weui_grid" id="show-toast-forbidden4" >
                    <div class="weui_grid_icon">
                        <img src='{{ url_for("static", filename="images/self_hostel.png") }}' alt="">
                    </div>
                    <p class="weui_grid_label">
                        楼宇记录
                    </p>
                </a>
            {% endif %}
            </div>
        </div>
</body>
</html>
<script>
   function scroll(){
    var xx, yy, XX, YY, swipeX, swipeY;
    var div = document.getElementsByTagName("div");
    document.body.addEventListener('touchstart', function(event) {
        xx = event.targetTouches[0].screenX;
        yy = event.targetTouches[0].screenY;
        swipeX = true;
        swipeY = true;
    })
    document.body.addEventListener('touchmove', function(event) {
        XX = event.targetTouches[0].screenX;
        YY = event.targetTouches[0].screenY;
        if (swipeX && Math.abs(XX - xx) - Math.abs(YY - yy) > 0) //左右滑动
        {
            event.stopPropagation();//组织冒泡
            event.preventDefault();//阻止浏览器默认事件
            swipeY = false;
            //左右滑动
        } else if (swipeY && Math.abs(XX - xx) - Math.abs(YY - yy) < 0) { //上下滑动
            swipeX = false;
            //上下滑动，使用浏览器默认的上下滑动
        }
    })

}
</script>
<script>
     $('#show-toast-forbidden').on("click", function () {
               $.toast("非辅导员，无权查看！", "forbidden");
      });
    $('#show-toast-forbidden2').on("click", function () {
               $.toast("非辅导员，无权查看！", "forbidden");
      });
    $('#show-toast-forbidden3').on("click", function () {
               $.toast("非辅导员，无权查看！", "forbidden");
      });
    $('#show-toast-forbidden4').on("click", function () {
               $.toast("非辅导员，无权查看！", "forbidden");
      });
    $('#nolocation').on("click", function () {
               $.toast("该生未授权获取位置！", "forbidden");
      })
</script>

